Builder

class Builder

Used to create a SyncConfiguration. For common use cases, a SyncConfiguration can be created using the SyncConfiguration.create function.

Constructors

Builder
Link copied to clipboard
fun Builder(user: User, schema: Set<KClass<out <ERROR CLASS>>>)
Creates a SyncConfiguration.Builder for Flexible Sync.
Builder
Link copied to clipboard
fun Builder(user: User, partitionValue: <ERROR CLASS>?, schema: Set<KClass<out <ERROR CLASS>>>)
Creates a SyncConfiguration.Builder for Partition-Based Sync.
Builder
Link copied to clipboard
fun Builder(user: User, partitionValue: <ERROR CLASS>?, schema: Set<KClass<out <ERROR CLASS>>>)
Creates a SyncConfiguration.Builder for Partition-Based Sync.
Builder
Link copied to clipboard
fun Builder(user: User, partitionValue: Int?, schema: Set<KClass<out <ERROR CLASS>>>)
Creates a SyncConfiguration.Builder for Partition-Based Sync.
Builder
Link copied to clipboard
fun Builder(user: User, partitionValue: Long?, schema: Set<KClass<out <ERROR CLASS>>>)
Creates a SyncConfiguration.Builder for Partition-Based Sync.
Builder
Link copied to clipboard
fun Builder(user: User, partitionValue: String?, schema: Set<KClass<out <ERROR CLASS>>>)
Creates a SyncConfiguration.Builder for Partition-Based Sync.

Functions

build
Link copied to clipboard
open fun build(): SyncConfiguration
errorHandler
Link copied to clipboard
fun errorHandler(errorHandler: SyncSession.ErrorHandler): SyncConfiguration.Builder
Sets the error handler used by Synced Realms when reporting errors with their session.
initialSubscriptions
Link copied to clipboard
fun initialSubscriptions(rerunOnOpen: Boolean = false, initialSubscriptionBlock: InitialSubscriptionsCallback): SyncConfiguration.Builder
Define the initial io.realm.mongodb.sync.
log
Link copied to clipboard
open fun log(level: <ERROR CLASS>, customLoggers: List<<ERROR CLASS>>): SyncConfiguration.Builder
name
Link copied to clipboard
open fun name(name: String): SyncConfiguration.Builder
Sets the filename of the realm file.
syncClientResetStrategy
Link copied to clipboard
fun syncClientResetStrategy(resetStrategy: SyncClientResetStrategy): SyncConfiguration.Builder
Sets the strategy that would handle the client reset by this synced Realm.
waitForInitialRemoteData
Link copied to clipboard
fun waitForInitialRemoteData(timeout: <ERROR CLASS> = Duration.INFINITE): SyncConfiguration.Builder
Setting this will cause the Realm to download all known changes from the server the first time a Realm is opened.